home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(load){
- function changeDir()
- {
- dir = random(2);
- if(dir == 0)
- {
- dir = "left";
- }
- if(dir == 1)
- {
- dir = "right";
- }
- }
- function bomb()
- {
- if(_root.paused)
- {
- return undefined;
- }
- if(health <= 0)
- {
- return undefined;
- }
- type = "bomb2";
- var _loc2_ = type + i;
- i++;
- _root.attachMovie(type,_loc2_,i);
- _root[_loc2_]._x = _X;
- _root[_loc2_]._y = _Y + 50;
- }
- if(_root.sound)
- {
- ufoS = new Sound(this);
- ufoS.attachSound("ufo");
- ufoS.setVolume(70);
- ufoS.start(0,9999);
- explode1 = new Sound(this);
- explode1.attachSound("explode2");
- explode = new Sound(this);
- explode.attachSound("explode1");
- }
- damage = false;
- health = 100;
- speed = 2;
- delay = 5000;
- resetTime = getTimer() + delay;
- time = 0;
- t = 0;
- changeDir();
- i = 1;
- }
-